#

# 判断是否是数字
if [[ $PID =~ ^[0-9]+$ ]]; then
    echo "PID is a number."
else
    echo "PID is invalid."
fi

# 判断是否ip
newIp='192.168.1.100'
reg='^([0-9]{1,3}.){3}[0-9]{1,3}$'
if [[ "$newIp" =~ $reg ]];then
    echo '找到了ip地址'
fi


